<% title _("Partition Tables") %>
<% title_actions new_link(_("Create Partition Table")),
                 documentation_button('4.4.4PartitionTables') %>

<table class="<%= table_css_classes 'table-fixed' %>">
  <thead>
    <tr>
      <th class="col-md-4"><%= sort :name, :as => s_("Ptable|Name") %></th>
      <th class="col-md-1"><%= sort :family, :as => s_("Ptable|OS Family") %></th>
      <th class="col-md-4"><%= _("Operating Systems") %></th>
      <th class="col-md-1"><%= sort :snippet, :as => s_("Ptable|Snippet") %></th>
      <th class="col-md-1"><%= sort :locked, :as => s_("Ptable|Locked"), :default => "DESC" %></th>
      <th class="col-md-1"><%= _('Actions') %></th>
    </tr>
  </thead>
  <tbody>
    <% for ptable in @templates %>
      <tr>
        <td class="ellipsis"><%= link_to_if_authorized ptable, hash_for_edit_ptable_path(:id => ptable).merge(:auth_object => ptable, :authorizer => authorizer) %></td>
        <td class="ellipsis"><%= lookup_family(ptable.os_family) %></td>
        <td class="ellipsis"><%= ptable.operatingsystems.map(&:to_label).to_sentence %></td>
        <td align='center'><%= checked_icon ptable.snippet %></td>
        <td align='center'>
          <%= locked_icon ptable.locked?, _("This template is locked for editing.") %>
        </td>
        <td>
          <%= action_buttons(*permitted_actions(ptable)) %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>
<%= will_paginate_with_info @templates %>
